FROM golang:1.24-alpine


WORKDIR /app
ENV GOPROXY=https://goproxy.cn,direct

COPY go.mod go.sum ./
RUN go mod tidy
RUN go mod download

COPY . .

RUN go build -o myapp cmd/main.go 
RUN ls -l /app
EXPOSE 8082
CMD ["./myapp"]                